#ifndef CHESSDEF_H
#define CHESSDEF_H

#include <iostream>
#include <map>

class ChessDef
{
public:
    enum pieceID {
        rche, rma, rxiang, rshi, shuai, rpao, bing,
        bche, bma, bxiang, bshi, jiang, bpao, zu,
        kong
    };

    static const pieceID initBoard[9][10];
    static const std::map<pieceID, std::string> pieceBmpPaths;

    static bool isRed(pieceID id);
    static bool isBlack(pieceID id);
};

inline bool ChessDef::isRed(pieceID id) 
{
    return id >= rche && id <= bing;
}

inline bool ChessDef::isBlack(pieceID id) 
{
    return id >= bche && id <= zu;
}

#endif // CHESSDEF_H